﻿using System.Collections.Generic;

namespace Actya.Web.ViewModels.Admin
{
	public class EditThemeViewModel
	{
		public string Name { get; set; }
		public string Description { get; set; }
		public string ContentRegions { get; set; }
		public ThemeDirectory Styles { get; set; }
		public ThemeDirectory Views { get; set; }

		public EditThemeViewModel()
		{
			this.Styles = new ThemeDirectory {Name = "Styles"};
			this.Views = new ThemeDirectory {Name = "Views"};
		}
	}

	public class ThemeDirectory
	{
		public string Name { get; set; }
		public string[] Files { get; set; }
		public List<ThemeDirectory> SubDirectories { get; set; }
		public ThemeDirectory ParentDirectory { get; set; }
		public string Path
		{
			get { return ParentDirectory != null ? ParentDirectory.Path + "/" + Name : Name; }
		}

		public ThemeDirectory()
		{
			this.Files = new string[0];
			this.SubDirectories = new List<ThemeDirectory>();
		}
	}
}